package com.socialnetwork.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory {
	
	private ConnectionFactory() {
	}

	public static Connection getConnection(){
		
		String url = "jdbc:postgresql://localhost/my_social_network";
		
		try {
			return DriverManager.getConnection(url, "my_social", "network");
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}
		
	}
}
